from datetime import datetime

from sqlalchemy import Column, Integer, String, DECIMAL
from sqlalchemy.dialects.mysql import LONGTEXT
from app.libs.tools import get_key_words
from app.libs.TextRank.textRank import TextRank
from app.models.base import Base, db
from app import redisclient
from app.config.setting import *


class AigcParagraphs(Base):
    id = Column(Integer, primary_key=True, autoincrement=True)
    order_number = Column(String(30), nullable=False)
    paragraph_index = Column(Integer, nullable=False)
    content = Column(LONGTEXT, default='')
    type = Column(String(30), default='')
    ai = Column(Integer, default=0)
    rate = Column(DECIMAL, default=0)
